package tests;

import java.sql.*;

class mySqlTest {
	public static void main(String[] args) {
		try {           

			Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.56.1/university?user=admin&password=password");

			PreparedStatement ps = conn.prepareStatement("select name from instructor");
			ResultSet rs = ps.executeQuery();
            
			while (rs.next()) {
				System.out.println(rs.getString(1));
			}  

			rs.close();
			ps.close();            
		} catch (Exception e) {
			e.printStackTrace();
		} 
	} 
}